Alan Third [Sat, 25 Jun 2016 23:10:50 +0000 (00:10 +0100)]
Prevent NS event loop being re-entered (bug#11049)
* nsterm.m (ns_read_socket, ns_select): Return -1 if already in event
loop instead of aborting.
Alan Third [Thu, 7 Jul 2016 19:42:11 +0000 (20:42 +0100)]
Fix some deprecated functions
* src/nsterm.m (firstRectForCharacterRange): In OS X >10.6 replace
convertBaseToScreen with convertRectToScreen.
* src/nsmenu.m (ns_update_menubar): Remove attachedMenu, deprecated in
OS X 10.2, and always seems to return nil.
Aaron Jensen [Thu, 7 Jul 2016 18:46:57 +0000 (19:46 +0100)]
Disable App Nap (bug#22993)
* nextstep/templates/Info.plist.in: Insert AppNap disable code.
Copyright-paperwork-exempt: yes
Michael Albinus [Thu, 7 Jul 2016 16:51:00 +0000 (18:51 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Thu, 7 Jul 2016 16:50:24 +0000 (18:50 +0200)]
Fix an error in Tramp for rsync
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
Make it work for "rsync".
(tramp-make-copy-program-file-name): Apply `directory-file-name'.
Tino Calancha [Thu, 7 Jul 2016 16:34:35 +0000 (01:34 +0900)]
Ibuffer: Mark locked buffers
* lisp/ibuf-ext.el (ibuffer-locked-buffer-p): New defun.
(ibuffer-mark-by-locked): New command.
(ibuffer-mode-map): Bind it to '% L'; update menus.
(ibuffer-mode): Update mode doc.
;* etc/NEWS: Add NEWS entry for these changes and previous two commits.
Tino Calancha [Thu, 7 Jul 2016 16:15:54 +0000 (01:15 +0900)]
* lisp/ibuffer.el: Add face for locked buffers
Tino Calancha [Thu, 7 Jul 2016 16:13:55 +0000 (01:13 +0900)]
* lisp/ibuffer.el: Add mark for locked buffers
Tino Calancha [Thu, 7 Jul 2016 15:57:40 +0000 (00:57 +0900)]
;* etc/NEWS (Ibuffer): Update entry according with last commit
Tino Calancha [Thu, 7 Jul 2016 14:59:45 +0000 (23:59 +0900)]
Remove duplicate binding
* lisp/ibuffer.el (ibuffer-mode-map): 'ibuffer-mark-by-content-regexp'
just bound to '% g'.
As suggested in:
http://lists.gnu.org/archive/html/emacs-devel/2016-07/msg00165.html
Tino Calancha [Thu, 7 Jul 2016 08:49:02 +0000 (17:49 +0900)]
Ibuffer: Drop needless binding
* lisp/ibuffer.el (ibuffer-mark-interactive): 'inhibit-read-only'
already bound to 't' inside 'ibuffer-set-mark'.
Phillip Lord [Mon, 27 Jun 2016 20:36:44 +0000 (21:36 +0100)]
Run tests from non-byte compiled files
* test/Makefile.in: Eval non-byte-compiled files for tests.
Mark Oteiza [Thu, 7 Jul 2016 03:16:32 +0000 (23:16 -0400)]
Replace eldoc-documentation-function with a hook
* lisp/emacs-lisp/eldoc.el (eldoc-documentation-functions): New hook.
(eldoc-documentation-function): Make into obsolete alias.
(eldoc-echo-area-use-multiline-p, eldoc-highlight-function-argument):
(eldoc-argument-case, global-eldoc-mode): Update docstrings.
(eldoc-print-current-symbol-info): Use run-hook-with-args-until-success
on eldoc-documentation-functions.
(eldoc-supported-p): New function.
(eldoc-mode, global-eldoc-mode, eldoc-schedule-timer): Use eldoc-supported-p.
* etc/NEWS: Mention eldoc-documentation-functions.
* doc/lispref/modes.texi: Update reference.
Simen Heggestøyl [Wed, 6 Jul 2016 17:25:10 +0000 (19:25 +0200)]
Complete "initial" and "unset" in CSS mode
* lisp/textmodes/css-mode.el (css--complete-property-value): Make
"initial" and "unset" completion candidates for all CSS properties,
just like "inherit".
* test/lisp/textmodes/css-mode-tests.el
(css-test-complete-property-value): Update test to reflect the above
change.
Michael Albinus [Wed, 6 Jul 2016 15:33:00 +0000 (17:33 +0200)]
* lisp/net/tramp-gvfs.el (tramp-gvfs-mount-spec): Fix typo.
Paul Eggert [Wed, 6 Jul 2016 14:10:13 +0000 (16:10 +0200)]
Simplify rfc1345.el a bit
* lisp/leim/quail/rfc1345.el: Omit commented-out codes for ASCII
that would no longer parse. Replace control characters with
escapes in character constants. Omit unnecessary \ after ?.
This does not change behavior.
Dmitry Antipov [Tue, 5 Jul 2016 05:33:29 +0000 (08:33 +0300)]
Prefer 'frame-parameter' where it is expected to be a bit faster
* lisp/international/mule-diag.el (mule-diag):
* lisp/menu-bar.el (menu-bar-showhide-scroll-bar-menu):
* lisp/mouse.el (mouse-drag-line, font-menu-add-default):
* lisp/scroll-bar.el (toggle-scroll-bar, toggle-horizontal-scroll-bar):
* lisp/faces.el (x-resolve-font-name): Use 'frame-parameter'.
Dmitry Antipov [Wed, 6 Jul 2016 03:03:12 +0000 (06:03 +0300)]
Reduce consing caused by vertical motion commands
* src/frame.c (Fframe_parameter): Avoid call to Fframe_parameters for the
parameters frequently requested by calls to 'next-line' and 'previous-line'.
Michael Albinus [Tue, 5 Jul 2016 19:16:25 +0000 (21:16 +0200)]
Make all Tramp tests pass for "gdrive" method
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory)
* lisp/net/tramp-compat.el (tramp-compat-copy-directory)
(tramp-compat-delete-directory):
* lisp/net/tramp-smb.el (tramp-smb-handle-delete-directory):
Use `directory-files-no-dot-files-regexp'.
* lisp/net/tramp-gvfs.el (tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-send-command): Call `tramp-flush-file-property' in
case of problems.
* test/lisp/net/tramp-tests.el (tramp--instrument-test-case):
Adapt docstring.
(tramp-test14-delete-directory): Make further tests.
Eli Zaretskii [Tue, 5 Jul 2016 16:33:01 +0000 (19:33 +0300)]
Fix redisplay with window-start on continuation lines
* src/xdisp.c (pos_visible_p): Return false if the window starts
after CHARPOS.
(compute_window_start_on_continuation_line): Don't return
window-start position that is after point in the buffer, as the
callers don't expect this to happen, and will generally display an
empty window with the cursor in its middle. (Bug#23871)
Tino Calancha [Tue, 5 Jul 2016 16:10:22 +0000 (01:10 +0900)]
Add :expected-result :failed for unfixed bug test
* test/lisp/help-fns-tests.el (help-fns-test-bug23887):
Tino Calancha [Tue, 5 Jul 2016 07:16:11 +0000 (16:16 +0900)]
* test/lisp/help-fns-tests.el: Add several tests for 'describe-function'.
Michal Nazarewicz [Wed, 22 Jun 2016 17:06:57 +0000 (19:06 +0200)]
Don’t create unnecessary marker in ‘delete-trailing-whitespace’
* lisp/simple.el (delete-trailing-whitespace): If END argument is nil,
there is no need for the end-marker to be created.
Michal Nazarewicz [Tue, 21 Jun 2016 14:46:52 +0000 (16:46 +0200)]
Simplify ‘delete-trailing-whitespace’ by not treating \n as whitespace
* lisp/simple.el (delete-trailing-whitespace): Set newline’s character
syntax to non-whitespace so that ‘\s-’ regular expression does not match
it.
This simplifies the loop slightly since a simple ‘\s-+$’ can be used and
as a consequence ‘line-beginning-position’ function does not need to be
called any longer.
Furthermore, when newline has whitespace syntax, ‘\s-$’ regular
expression ends up matching empty lins since ‘\s-’ matches newline
characetr of proceeding line. This leads to needless loop iterations.
Since previous change to ‘delete-trailing-whitespace’ already introduced
‘with-syntax-table’, take advantage of it and also overwrite newline’s
character syntax.
Michal Nazarewicz [Tue, 21 Jun 2016 14:52:52 +0000 (16:52 +0200)]
Make ‘delete-trailing-whitespace’ delete spaces after form feed
* lisp/simple.el (delete-trailing-whitespace): Treat form fead as
a non-whitespace character (regradless of whether it’s character syntax
is whitespace) and delete any whitespace following it instead of leaving
lines with form feeds completely unchanged. I.e. a line like "\f " will
now became "\f".
Dmitry Antipov [Mon, 4 Jul 2016 17:05:06 +0000 (20:05 +0300)]
Cleanup XEditRes hack
* configure.ac [USE_X_TOOLKIT]: Define X_TOOLKIT_EDITRES if
_XEditResCheckMessages is declared in X11/Xmu/Editres.h and may be
linked with -lXmu. This should work with any non-ancient Xmu library.
* xfns.c (toplevel): Remove old cruft.
(x_window) [USE_X_TOOLKIT]: Use X_TOOLKIT_EDITRES.
* xterm.c (toplevel): Remove old cruft.
(handle_one_xevent): Use X_TOOLKIT_EDITRES.
* xterm.h (toplevel): Include X11/Xmu/Editres.h if X_TOOLKIT_EDITRES.
Michael Albinus [Mon, 4 Jul 2016 13:36:30 +0000 (15:36 +0200)]
Add Google Drive support to Tramp
* doc/misc/tramp.texi: Add `gdrive' method.
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.3.1-pre".
* etc/NEWS: Add Tramp connection method "gdrive".
* lisp/net/tramp-gvfs.el (tramp-gvfs-methods) <gdrive>: Add.
(tramp-default-user-alist, tramp-default-host-alist): Add rule
for "gdrive".
(tramp-gvfs-file-attributes): Add "name", remove "standard::icon".
(tramp-gvfs-file-attributes-with-gvfs-ls-regexp): Simplify regexp.
(tramp-gvfs-get-directory-attributes): Improve loop. Use
"standard::display-name" as file name, if available.
(tramp-gvfs-handle-file-name-all-completions): Simplify.
(tramp-gvfs-url-file-name, tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec):
Map between "gdrive" and "google-drive".
* lisp/net/tramp.el (tramp-call-process): Do not signal error.
* test/lisp/net/tramp-tests.el (tramp--instrument-test-case):
Do not enable `tramp-message-show-message'.
(tramp-test13-make-directory, tramp-test14-delete-directory):
Do not specify error type.
Tino Calancha [Mon, 4 Jul 2016 07:08:55 +0000 (16:08 +0900)]
Calc: Update mode line after change mode
* lisp/calc/calc-ext.el (calc-change-mode): Call 'calc-set-mode-line'.
Mark Oteiza [Sun, 3 Jul 2016 22:53:39 +0000 (18:53 -0400)]
* lisp/simple.el (save-mark-and-excursion): Add declare forms.
Paul Eggert [Sun, 3 Jul 2016 22:46:57 +0000 (00:46 +0200)]
Re-fix open-network-stream responsiveness
Problem reported by Christer Ekholm (Bug#23864).
* src/process.c (wait_reading_process_output): Further fix for
typo introduced in 2015-07-06T02:19:13Z!eggert@cs.ucla.edu when
wait == INFINITY and got_output_end_time is invalid. See:
http://bugs.gnu.org/23864#20
Alan Mackenzie [Sun, 3 Jul 2016 18:13:51 +0000 (18:13 +0000)]
Remove redundant forms from CC Mode for faster fontification
* lisp/progmodes/cc-fonts.el (c-font-lock-declarations): Remove four arms of
the "main" cond form in the function, which have been redundant since the
extraction of c-font-lock-cut-off-declarators from the function on
2016-06-15/16.
Alan Mackenzie [Sun, 3 Jul 2016 13:11:28 +0000 (13:11 +0000)]
Speed up CC Mode fontification with less accurate functions extending region
* lisp/progmodes/cc-fonts.el (c-font-lock-cut-off-declarators)
(c-font-lock-enclosing-decls)
* lisp/progmodes/cc-mode.el (c-fl-decl-start): Replace invocations of
c-beginning-of-decl-1 with less accurate invocations of
c-syntactic-skip-backwards to speed up fontification.
Tino Calancha [Sun, 3 Jul 2016 12:42:02 +0000 (21:42 +0900)]
Ibuffer: unmark all buffers without confirmation
* lisp/ibuffer.el (ibuffer-unmark-all-marks): New command (Bug#23680).
(ibuffer-mouse-popup-menu): Use it.
(ibuffer-mode): Update mode doc.
(ibuffer-mode-map): Bind 'ibuffer-unmark-all-marks' to 'U'.
Rebind 'ibuffer-do-replace-regexp' to 'r'.
; * etc/NEWS: Add entry for this change.
Paul Eggert [Sun, 3 Jul 2016 08:49:21 +0000 (10:49 +0200)]
Fix open-network-stream responsiveness
Problem reported by Constantin Kulikov (Bug#23684).
* src/process.c (wait_reading_process_output):
Fix typo introduced in 2015-07-06T02:19:13Z!eggert@cs.ucla.edu
when wait == INFINITY and got_output_end_time is invalid.
In this case the code should break, not continue.
Tino Calancha [Sun, 3 Jul 2016 05:51:18 +0000 (14:51 +0900)]
Ibuffer: Mark buffers by content
* lisp/ibuf-ext.el (ibuffer-mark-by-content-regexp): New command.
(ibuffer-never-search-content-name): New option.
(ibuffer-never-search-content-mode): Idem.
(ibuffer-mark-by-content-regexp): Use them (Bug#23734).
* lisp/ibuffer.el (ibuffer-mode-map): Bind new command to '% c' and '% g'.
(ibuffer-mode): Update mode documentation.
; * etc/NEWS: Add NEWS entry for these changes.
Tino Calancha [Sun, 3 Jul 2016 05:11:49 +0000 (14:11 +0900)]
ibuffer-copy-filename-as-kill verbosity increase
* lisp/ibuf-ext.el (ibuffer-copy-filename-as-kill):
Use shorter name, result, for a local bound var.
Show the string result in the echo area.
Eli Zaretskii [Sat, 2 Jul 2016 13:56:36 +0000 (16:56 +0300)]
Fix cursor positioning on TTY frames after stretch glyph
* src/term.c (append_glyph, append_composite_glyph)
(append_glyphless_glyph): Set the avoid_cursor_p and multibyte_p
members of the produced 'struct glyph'. Fixes cursor positioning
on the first character after a stretch glyph produced from
line-prefix, wrap-prefix, etc. on TTY frames.
Eli Zaretskii [Sat, 2 Jul 2016 12:39:26 +0000 (15:39 +0300)]
Fix vertical-movement in buffers with wrap-prefix
* src/indent.c (Fvertical_motion): Zero the current_y coordinate
whenever we zero the vpos vertical position of the iterator.
* src/xdisp.c (move_it_in_display_line_to): Handle line-prefix and
wrap-prefix regardless of whether the current Y coordinate is
inside the window dimensions. (Bug#23879)
Eli Zaretskii [Sat, 2 Jul 2016 09:39:47 +0000 (12:39 +0300)]
Rename FACE_OPT_FROM_ID to FACE_FROM_ID_OR_NULL
* src/dispextern.h (FACE_FROM_ID_OR_NULL): Renamed from
FACE_OPT_FROM_ID; all callers changed.
* src/xdisp.c (extend_face_to_end_of_line): Call FACE_FROM_ID, not
FACE_FROM_ID_OR_NULL, as the resulting face is immediately
dereferenced.
(fill_gstring_glyph_string): Call FACE_FROM_ID, not
FACE_FROM_ID_OR_NULL, as the resulting face will be dereferenced
when the glyph string is drawn.
(BUILD_COMPOSITE_GLYPH_STRING): Call FACE_FROM_ID, not
FACE_FROM_ID_OR_NULL, as the resulting face will be dereferenced
in fill_composite_glyph_string.
(calc_line_height_property): Call FACE_FROM_ID_OR_NULL rather that
FACE_FROM_ID, since the function and its caller can cope with that
situation. Conflate 3 tests of missing face or font into just
one.
* src/xfaces.c (Fx_list_fonts, Fface_font, lookup_face): Call
FACE_FROM_ID_OR_NULL rather that FACE_FROM_ID, since these
functions can cope with that situation.
(lookup_derived_face): Don't call FACE_FROM_ID if the result will
not be used.
* src/w32console.c (w32_face_attributes): Remove redundant 'eassert'.
Mark Oteiza [Fri, 1 Jul 2016 22:50:00 +0000 (18:50 -0400)]
* lisp/gnus/gnus-art.el (gnus-article-send-map): Remove extra quote.
Stefan Monnier [Fri, 1 Jul 2016 15:59:37 +0000 (11:59 -0400)]
* lisp/auth-source.el (auth-source--symbol-keyword): Fix namespace
i.e. rename from auto-source--symbol-keyword.
Dmitry Antipov [Fri, 1 Jul 2016 15:45:24 +0000 (18:45 +0300)]
Avoid yet another possible NULL pointer dereference found by GCC 6.1.1
* lwlib/lwlib.c (lw_get_all_values): Always check the value returned by
get_widget_info.
Glenn Morris [Fri, 1 Jul 2016 10:18:09 +0000 (06:18 -0400)]
; Auto-commit of loaddefs files.
Alan Mackenzie [Thu, 30 Jun 2016 12:58:30 +0000 (12:58 +0000)]
CC Mode: truncate the semi-nonlit cache when applying syntax-table to a quote
This applies to applying or removing syntax-table text properties in raw
strings which affect the stringiness of a piece of text. This fixes the
bug
reported in
http://lists.gnu.org/archive/html/emacs-devel/2016-06/msg00695.html.
* lisp/progmodes/cc-engine.el (c-truncate-semi-nonlit-pos-cache): new
defsubst.
(c-invalidate-state-cache-1): Call new function in place of inline
manipulation.
(c-depropertize-raw-string, c-propertize-raw-string-opener): truncate the
semi-nonlit cache when pertinent syntax-table text properties get applied to
the text.
Dmitry Antipov [Thu, 30 Jun 2016 06:30:41 +0000 (09:30 +0300)]
Minor tweaks to openp
* src/lread.c (openp): Move invariant code out of the loop
and thus avoid redundant calls to memcpy. Adjust comments.
Dmitry Antipov [Thu, 30 Jun 2016 06:21:07 +0000 (09:21 +0300)]
Simplify handling of frame parameters
* src/frame.c (x_set_frame_parameters): Avoid extra loop processing
foreground color, background color and font parameters. Adjust
comments.
Dmitry Antipov [Thu, 30 Jun 2016 05:37:46 +0000 (08:37 +0300)]
Cleanup around mature character manipulation functions
* lisp/international/mule-diag.el (decode-codepage-char): Remove.
* lisp/ldefs-boot.el (toplevel): Adjust accordingly.
* lisp/subr.el (toplevel): Do not advertise calling conventions
for 'decode-char' and 'encode-char'.
* src/charset.c (Fdecode_char, Fencode_char): Remove unused 3rd arg.
Alan Mackenzie [Wed, 29 Jun 2016 20:17:39 +0000 (20:17 +0000)]
Fix C-M-a in a C function finding the start of a macro preceding it.
Also amend some pertinent documentation. This fixes bug #23818.
* lisp/progmodes/cc-engine.el (c-beginning-of-decl-1): Also check for a
virtual semicolon at a place where we check for other types of statement ends.
* lisp/progmodes/cc-vars.el (c-macro-nacmes-with-semicolon): Remove from the
doc string the bit saying that the variable is a prototype and liable to
change.
* doc/misc/cc-mode.texi (Macros with ;): Enhance, stating that configuring
macros with semicolon can prevent C-M-a missing the beginning of defun.
Dmitry Antipov [Wed, 29 Jun 2016 04:46:59 +0000 (07:46 +0300)]
Avoid possible NULL pointer dereference found by GCC 6.1.1
* src/xfns.c (x_get_monitor_attributes_xrandr): Always check
the value returned by XRRGetOutputInfo.
Tino Calancha [Wed, 29 Jun 2016 02:47:16 +0000 (11:47 +0900)]
Dired recognize dirs when file size in human units
* lisp/dired.el (dired-re-inode-size): Update 'dired-re-inode-size'
to match when Dired displays the allocated file size column
in human readable units (Bug#22255).
Mark Oteiza [Wed, 29 Jun 2016 01:52:48 +0000 (21:52 -0400)]
Fix breakage from previous change
* lisp/textmodes/tex-mode.el (tex-font-lock-keywords-1):
* lisp/vc/log-view.el (log-view-font-lock-keywords): Quote face.
Mark Oteiza [Tue, 28 Jun 2016 19:49:48 +0000 (15:49 -0400)]
Fix breakage from previous change.
* lisp/textmodes/texinfo.el (texinfo-font-lock-keywords): Quote face.
Eli Zaretskii [Tue, 28 Jun 2016 16:59:46 +0000 (19:59 +0300)]
Add tests for copying properties by 'format'
* test/src/editfns-tests.el (format-properties): New test.
Eli Zaretskii [Tue, 28 Jun 2016 16:03:43 +0000 (19:03 +0300)]
Fix copying properties in 'format' when it produces padding
* src/textprop.c (extend_property_ranges): Correct range extension
when the new end is beyond the old end. (Bug#23859)
Alan Third [Wed, 4 May 2016 21:22:09 +0000 (22:22 +0100)]
Enable dividers in NS (bug#22973)
src/nsfns.m: Add colour settings functions to ns_frame_park_handlers.
src/nsterm.m (ns_draw_window_divider): ns_focus has to go before the
attempt to set the colour.
src/nsterm.m (ns_draw_vertical_window_border): This had the same bug as
above, although I didn't see any errors.
Stephen Berman [Mon, 27 Jun 2016 20:50:03 +0000 (16:50 -0400)]
; Fix breakage from previous commit
Lars Magne Ingebrigtsen [Mon, 27 Jun 2016 20:26:02 +0000 (22:26 +0200)]
Fix the prefix action of shr-copy-url
* lisp/net/shr.el (shr-copy-url): Make the command really copy
the image url if given a prefix.
Lars Magne Ingebrigtsen [Mon, 27 Jun 2016 20:25:10 +0000 (22:25 +0200)]
New functions svg-text and svg-remove
* doc/lispref/display.texi (SVG Images): Document svg-remove.
* doc/lispref/display.texi (SVG Images): Document svg-text.
* lisp/svg.el (svg-remove): New function.
(svg-text): New function.
Lars Magne Ingebrigtsen [Mon, 27 Jun 2016 20:20:29 +0000 (22:20 +0200)]
Add new function dom-remove-node
* doc/lispref/text.texi (Document Object Model): Document
dom-remove-node.
* lisp/dom.el (dom-remove-node): New function.
Lars Magne Ingebrigtsen [Mon, 27 Jun 2016 16:20:48 +0000 (18:20 +0200)]
Add a new function `svg-embed'
* doc/lispref/display.texi (SVG Images): Document `svg-embed'.
* lisp/svg.el (svg-embed): New function.
(svg--image-data): Ditto.
Eli Zaretskii [Mon, 27 Jun 2016 16:13:48 +0000 (19:13 +0300)]
* lisp/descr-text.el (describe-char-unicode-data): Fix copy/paste errors.
Eli Zaretskii [Mon, 27 Jun 2016 15:27:58 +0000 (18:27 +0300)]
Fix 'move-to-window-line' when EOB is on last screen line
* src/window.c (displayed_window_lines): Fix an off-by-one error
when the bottom of the last display line is exactly at window's
last pixel. Remove kludgey fix for TTY frames that is no longer
needed. (Bug#15760)
(Fmove_to_window_line): Doc fix.
* doc/lispref/positions.texi (Screen Lines): Clarify and make more
accurate the documentation of 'move-to-window-line'.
Alan Mackenzie [Mon, 27 Jun 2016 11:34:02 +0000 (11:34 +0000)]
Amend a cache so that typing into C++ raw strings has no undue delay.
Also amend the code so that low-level searches to the end of literals are done
only when these positions get used.
* lisp/progmodes/cc-engine.el (c-crosses-statement-barrier-p): Use the new
c-literal-start instead of c-literal-limit.
(c-state-semi-nonlit-pos-cache): Change the structure of this cache, such that
it stores details of the literal at a point, rather than merely points outside
of literals.
(c-state-semi-pp-to-literal, c-state-full-pp-to-literal)
(c-cache-to-parse-ps-state, c-parse-ps-state-to-cache, c-ps-state-cache-pos)
(c-parse-ps-state-below, c-literal-start): New functions.
(c-state-semi-safe-place): Removed.
(c-in-literal): Use c-state-semi-pp-to-literal, so as not to scan to its end.
(c-literal-limits, c-determine-limit-get-base): consequential amendments.
(c-find-decl-spots, c-before-change-check-<>-operators, c-raw-string-pos)
(c-guess-basic-syntax (CASE 2)): Avoid needless scans to end of literals.
* lisp/progmodes/cc-fonts.el (c-font-lock-doc-comments): Avoid needless scans
to end of literals.
* lisp/progmodes/cc-mode.el (c-fl-decl-start): Avoid needless scans to end of
literals.
* lisp/progmodes/cc-cmds.el (c-beginning-of-defun, c-end-of-defun)
(c-defun-name, c-declaration-limits): Avoid needless scans to end of literals.
Dmitry Gutov [Mon, 27 Jun 2016 04:26:46 +0000 (07:26 +0300)]
Also handle escaping when string begins with a quote
* lisp/progmodes/ruby-mode.el (ruby-toggle-string-quotes):
Handle quoting of the first character in the string.
* test/lisp/progmodes/ruby-mode-tests.el
(ruby-toggle-string-quotes-quotes-correctly): Update.
Sriram Thaiyar [Wed, 22 Jun 2016 16:21:26 +0000 (09:21 -0700)]
Fix quote escaping in ruby-toggle-string-quotes
* lisp/progmodes/ruby-mode.el (ruby-toggle-string-quotes):
Change logic to quote based on the current quote of the string.
* test/lisp/progmodes/ruby-mode-tests.el
(ruby-toggle-string-quotes-quotes-correctly): Add test.
Copyright-paperwork-exempt: yes
Noam Postavsky [Sat, 25 Jun 2016 00:44:44 +0000 (20:44 -0400)]
Fix test-completion with completion-regexp-list
* src/minibuf.c (Ftest_completion): Handle alist COLLECTION with non-nil
completion-regexp-list (Bug #23533).
Paul Eggert [Sun, 26 Jun 2016 21:27:21 +0000 (23:27 +0200)]
Try other addresses when connecting to multihomed
Problem reported by Juliusz Chroboczek (Bug#17976)
and by Artur Malabarba (Bug#23620).
Patch from a suggestion by Andreas Schwab in:
http://bugs.gnu.org/17976#39
This patch is for non-MS-Windows platforms.
I don't know the situation on MS-Windows.
* src/process.c (connecting_status):
New function, for (connect . ADDRINFOS).
(connect_network_socket, check_for_dns, wait_for_socket_fds)
(wait_while_connecting, wait_reading_process_output, status_notify):
Use it.
(decode_status, Fmake_network_process):
Support (connect . ADDRINFOS) status.
(connect_network_socket) [!WINDOWSNT]:
If the connection failed and there are other addresses to try, do not
signal an error; instead, loop around to try the next address.
(wait_reading_process_output): Advance to the next address
if there are multiple addresses and the first remaining address
failed.
* src/process.h (struct Lisp_Process.status): Adjust comment
to describe (connect . ADDRINFOS).
Paul Eggert [Sun, 26 Jun 2016 20:21:49 +0000 (22:21 +0200)]
Fix GNUC_PREREQ for GCC 2.8.1 etc.
Problem reported by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2016-06/msg00608.html
* src/conf_post.h (GNUC_PREREQ): Port to GCC versions like GCC
2.8.1 (1998), which come before GCC 3.0 and which have nonzero
patchlevel numbers.
Eli Zaretskii [Sun, 26 Jun 2016 16:51:22 +0000 (19:51 +0300)]
Don't set 'bidi-paragraph-direction' in 'ansi-term'
* lisp/term.el (ansi-term): Remove unnecessary setting of
'bidi-paragraph-direction'. The underlying problem is solved in
bidi.c by changing the regexps that define the paragraph beginning
and end. (Bug#20611)
Paul Eggert [Sun, 26 Jun 2016 11:38:21 +0000 (13:38 +0200)]
; Spelling fixes
Michael Albinus [Sun, 26 Jun 2016 11:02:38 +0000 (13:02 +0200)]
Sync with Tramp 2.3.0
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.3.0".
Paul Eggert [Sun, 26 Jun 2016 10:44:39 +0000 (12:44 +0200)]
Fix GNUC_PREREQ off-by-1 typo
Problem reported by Martin Rudalics in:
http://lists.gnu.org/archive/html/emacs-devel/2016-06/msg00587.html
* src/conf_post.h (GNUC_PREREQ) [__GNUC_PATCHLEVEL__]:
Fix < vs <= typo.
Michael Albinus [Sun, 26 Jun 2016 10:30:21 +0000 (12:30 +0200)]
Fix some oddities in Tramp's rsync and smb methods
* lisp/net/tramp-sh.el (tramp-methods) <rsync>: Add "-p" and
"-s" arguments.
(tramp-do-copy-or-rename-file-out-of-band):
Call `file-name-directory' also for remote NEWNAME.
* test/lisp/net/tramp-tests.el (tramp-test15-copy-directory):
Do not skip for tramp-smb.el. Test als COPY-CONTENTS case.
(tramp-test24-file-name-completion): Improve check for
hostname completion.
(tramp--test-rsync-p): New defun.
(tramp-test31-special-characters)
(tramp-test31-special-characters-with-stat)
(tramp-test31-special-characters-with-perl)
(tramp-test31-special-characters-with-ls, tramp-test32-utf8)
(tramp-test32-utf8-with-stat, tramp-test32-utf8-with-perl)
(tramp-test32-utf8-with-ls): Skip for "rsync".
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory):
Check also for CIFS capabilities.
Ury Marshak [Sun, 26 Jun 2016 08:10:46 +0000 (09:10 +0100)]
Fix FRAME_INTERNAL_BORDER_WIDTH use (Bug#23841)
* src/nsfns.m (x_set_internal_border_width): Replace assignments to
FRAME_INTERNAL_BORDER_WIDTH.
Copyright-paperwork-exempt: yes
Leo Liu [Sun, 26 Jun 2016 01:55:39 +0000 (09:55 +0800)]
Deprecations (bug#23850)
* lisp/subr.el (string-to-unibyte, string-as-unibyte,
string-to-multibyte, string-as-multibyte): Make obsolete.
Tino Calancha [Sun, 26 Jun 2016 01:54:29 +0000 (10:54 +0900)]
Do not prompt twice to save a buffer
* lisp/hilit-chg.el (highlight-markup-buffers): (Bug#23824).
Alan Third [Fri, 17 Jun 2016 23:02:32 +0000 (00:02 +0100)]
Move text line right when in box (bug#23755)
* src/nsterm.m (ns_draw_glyph_string_foreground): Create to take
CHAR_GLYPH specific code and move glyphs right if within a box.
(ns_draw_glyph_string): Move CHAR_GLYPH specific code into above
function.
Paul Eggert [Sat, 25 Jun 2016 22:16:25 +0000 (00:16 +0200)]
Merge from origin/emacs-25
0377fe2 ; Spelling fixes
f253695 Update docs for `customize-mode'
4395aaa Fix documentation of 'assoc-string' and 'compare-strings'
ab0ebb9 ; Only load .elc file in tests.
a98aa02 Error on multibyte characters in HTTP request
ea512a7 * lisp/gnus/mm-decode.el (mm-convert-shr-links): Mask keys th...
8297331 ; Revert "Ensure undo-boundary after insert-file-contents."
dc5e65b Unset GIT_DIR when calling Git commands
6cdd8f7 Ensure undo-boundary after insert-file-contents.
4793f5f Clarify documentation of 'line-spacing' and 'line-height'
5f37572 Fix removal of variables from process-environment
e5e886d * admin/authors.el (authors-ignored-files, authors-valid-file...
db0777b * admin/authors.el (authors-aliases, authors-fixed-case): Add...
# Conflicts:
# doc/lispref/modes.texi
# lisp/gnus/mm-decode.el
Paul Eggert [Sat, 25 Jun 2016 22:06:27 +0000 (00:06 +0200)]
; Spelling fixes
Noam Postavsky [Sat, 25 Jun 2016 17:12:11 +0000 (13:12 -0400)]
Update docs for `customize-mode'
* lisp/cus-edit.el (customize-mode): This function works with both major
and minor modes, make docstring and prompt reflect that (Bug #23649).
* doc/lispref/modes.texi (Derived Modes): Remove note about
customize-mode being experimental; it has been around since Emacs
22 (Bug #11299).
Co-authored-by: Drew Adams <drew.adams@oracle.com>
Mark Oteiza [Sat, 25 Jun 2016 14:31:04 +0000 (10:31 -0400)]
Teach net-utils more iproute2 and nl80211 tools
* lisp/net/net-utils.el (iwconfig-program): Add iw(8).
(iwconfig-program-options): Add "dev" argument for iw. Another useful
option is "phy"; beyond that one needs to know the interface name.
(netstat-program): Add ss(8).
(route-program): Add ip(8).
(route-program-options): Add "route" argument for ip.
Leo Liu [Sat, 25 Jun 2016 01:35:39 +0000 (09:35 +0800)]
Use use-region-p in prolog.el
* lisp/progmodes/prolog.el (region-exists-p): Remove.
* lisp/progmodes/prolog.el (prolog-edit-menu-runtime,
prolog-edit-menu-insert-move): Use use-region-p.
Leo Liu [Sat, 25 Jun 2016 00:57:51 +0000 (08:57 +0800)]
Remove compatibility with Emacs 24.3 in octave-mode
* lisp/progmodes/octave.el: Clean up and remove compatibility with
Emacs 24.3.
Alan Mackenzie [Fri, 24 Jun 2016 16:03:29 +0000 (16:03 +0000)]
Ensure hack-local-variables is run in a fundamental mode buffer.
This fixes bug #23827.
* src/buffer.c (set-buffer-major-mode): Run `fundamental-mode' when the buffer
gets set to that mode, so that `run-mode-hooks', and thus
`hack-local-variables' get run.
Tino Calancha [Fri, 24 Jun 2016 15:26:09 +0000 (00:26 +0900)]
Fix caller to ediff-setup
* lisp/hilit-chg.el (hilit-chg-get-diff-info): #Bug23820.
Alan Mackenzie [Fri, 24 Jun 2016 13:26:34 +0000 (13:26 +0000)]
Implement ' separators in C++ integer literals.
* lisp/progmodes/cc-langs.el (c-get-state-before-change-functions): insert
c-before-after-change-digit-quote into the C++ value.
(c-before-font-lock-functions): Insert c-depropertize-new-text into the values
for all languages. Insert c-before-after-change-digit-quote into the C++
value.
* lisp/progmodes/cc-mode.el (c-depropertize-CPP): Wrap the function in
c-save-buffer-state.
(c-depropertize-new-text, c-before-after-change-digit-quote): New functions.
Paul Eggert [Fri, 24 Jun 2016 11:49:32 +0000 (13:49 +0200)]
Update from gnulib
This incorporates:
2016-06-24 intprops: port better to GCC 7
2016-06-13 xalloc-oversized: port to GCC 7; fewer warnings
* doc/misc/texinfo.tex, lib/xalloc-oversized.h, lib/intprops.h:
Copy from gnulib.
Martin Rudalics [Fri, 24 Jun 2016 07:59:50 +0000 (09:59 +0200)]
Remove two uses of 'min' in Fwindow_text_pixel_size
* src/xdisp.c (Fwindow_text_pixel_size): Don't use 'min' since
it calls move_it_to twice. Suggested by Eli Zaretskii.
Paul Eggert [Fri, 24 Jun 2016 00:19:13 +0000 (02:19 +0200)]
Clarify intent of FACE_FROM_ID and IMAGE_FROM_ID
* src/dispextern.h (FACE_OPT_FROM_ID): Don’t use FACE_FROM_ID,
since it is intended to be used only when it returns a non-null
pointer, and here the pointer might be null.
(IMAGE_OPT_FROM_ID): Don’t use IMAGE_FROM_ID, for similar reasons.
Mark Oteiza [Thu, 23 Jun 2016 22:48:12 +0000 (18:48 -0400)]
Remove some more face aliases obsoleted in 22.1
* lisp/eshell/em-ls.el (eshell-ls-directory-face, eshell-ls-symlink-face,
eshell-ls-executable-face, eshell-ls-readonly-face,
eshell-ls-unreadable-face, eshell-ls-special-face,
eshell-ls-missing-face, eshell-ls-archive-face, eshell-ls-backup-face,
eshell-ls-product-face, eshell-ls-clutter-face): Remove.
* lisp/isearch.el (isearch-lazy-highlight-face, lazy-highlight-face): Remove.
(isearch-lazy-highlight-update): Use face symbol.
* lisp/net/sieve-mode.el (sieve-control-commands-face,
sieve-action-commands-face, sieve-test-commands-face,
sieve-tagged-arguments-face): Remove.
(sieve-font-lock-keywords): Use non-obsolete faces.
* lisp/progmodes/sh-script.el (sh-heredoc-face): Remove.
(sh-get-indent-info, sh-prev-line): Use face symbol.
* lisp/textmodes/tex-mode.el (tex-font-lock-keywords-1):
Use non-obsolete face.
(tex-math-face, tex-verbatim-face): Remove.
(tex-font-lock-syntactic-face-function): Use face symbols.
Mark Oteiza [Thu, 23 Jun 2016 21:13:11 +0000 (17:13 -0400)]
Remove some face aliases obsoleted in 22.1
* lisp/faces.el (modeline-inactive, modeline-highlight, modeline-buffer-id):
* lisp/hilit-chg.el (highlight-changes-face, highlight-changes-delete-face):
* lisp/info.el (Info-title-1-face, Info-title-2-face, Info-title-3-face,
Info-title-4-face, info-menu-5):
* lisp/obsolete/old-whitespace.el (whitespace-highlight-face):
* lisp/paren.el (show-paren-match-face, show-paren-mismatch-face):
* lisp/progmodes/make-mode.el (makefile-space-face):
* lisp/textmodes/texinfo.el (texinfo-heading-face): Remove.
(texinfo-font-lock-keywords): Use texinfo-heading face.
* lisp/vc/add-log.el (change-log-date-face, change-log-name-face,
change-log-email-face, change-log-file-face, change-log-list-face,
change-log-conditionals-face, change-log-function-face,
change-log-acknowledgement-face):
* lisp/vc/diff-mode.el (diff-header-face, diff-file-header-face,
diff-index-face, diff-hunk-header-face, diff-removed-face, diff-added-face,
diff-changed-face, diff-function-face, diff-context-face,
diff-nonexistent-face): Remove.
(diff-use-changed-face, diff-font-lock-keywords): Use non-obsolete face
symbols.
(diff-hunk-file-names): Fix comment.
(diff-refine-change): Remove.
(diff-refine-removed, diff-refine-added, diff-refine-hunk): Use
non-obsolete face.
* lisp/vc/log-view.el (log-view-file-face, log-view-message-face): Remove.
(log-view-font-lock-keywords): Use non-obsolete face names.
* lisp/vc/pcvs-info.el (cvs-header-face, cvs-filename-face, cvs-unknown-face,
cvs-handled-face, cvs-need-action-face, cvs-marked-face, cvs-msg-face):
* lisp/wid-edit.el (widget-documentation-face, widget-button-face,
widget-field-face, widget-single-line-field-face, widget-inactive-face,
widget-button-pressed-face):
* lisp/woman.el (woman-italic-face, woman-bold-face, woman-unknown-face,
woman-addition-face): Remove.
Eli Zaretskii [Thu, 23 Jun 2016 19:44:08 +0000 (22:44 +0300)]
* lisp/international/characters.el (standard-case-table): Improve last change.
Eli Zaretskii [Thu, 23 Jun 2016 19:22:39 +0000 (22:22 +0300)]
Improve results of 'upcase' for characters with title-case
* lisp/international/characters.el (standard-case-table): Swap the
order of some lines, to have 'upcase' return the upper-case
variant, not the title-case, for some characters whose lower-case
map to the same codepoints. (Bug#23833)
Alan Mackenzie [Thu, 23 Jun 2016 16:12:45 +0000 (16:12 +0000)]
Make typing into incomplete C++ raw strings work, and make it work fast enough
* lisp/progmodes/cc-engine.el (c-beginning-of-macro, c-state-pp-to-literal):
Put `save-match-data' around calls to `looking-at' to enable the use of the
match data in higher level functions.
* lisp/progmodes/cc-fonts.el (c-font-lock-declarations)
(c-font-lock-cut-off-declarators): Use `limit' rather than `(point-max)' as a
limit to speed up handling of C++ raw strings.
Eli Zaretskii [Thu, 23 Jun 2016 15:09:14 +0000 (18:09 +0300)]
Fix documentation of 'assoc-string' and 'compare-strings'
* src/minibuf.c (Fassoc_string): Clarify how CASE-FOLD affects the
string comparison. (Bug#23833)
* src/fns.c (Fcompare_strings): Fix the description of how
IGNORE-CASE affects the comparison.
* doc/lispref/strings.texi (Text Comparison): Clarify how
CASE-FOLD affects the string comparison in 'assoc-string'. Fix
the description of how IGNORE-CASE affects the comparison in
'compare-strings'.
Eli Zaretskii [Thu, 23 Jun 2016 14:32:01 +0000 (17:32 +0300)]
Fix handling of LWINDOW key on MS-Windows
* src/w32fns.c (funhook): Correct a typo which broke handling of
the LWINDOW key. (Bug#23830)
Phillip Lord [Wed, 22 Jun 2016 20:59:51 +0000 (21:59 +0100)]
; Only load .elc file in tests.
* test/automated/viper-tests.el (viper-test-undo-kmacro): Ensure that
empty load file ends with .elc extension.
Dmitry Gutov [Wed, 22 Jun 2016 18:20:06 +0000 (21:20 +0300)]
Error on multibyte characters in HTTP request
* lisp/url/url-http.el (url-http-create-request): Check the
constructed request in the end to verify that it does not contain
multibyte characters (bug#23750).
Dmitry Gutov [Wed, 22 Jun 2016 18:10:11 +0000 (21:10 +0300)]
; Revert "Prohibit multibyte characters in url-http-data"
This reverts commit
2ede29575fa22eb7c265117d7511cff9fe02c606.
In favor of a better solution to be pushed to emacs-25.
Eli Zaretskii [Wed, 22 Jun 2016 16:52:49 +0000 (19:52 +0300)]
Update Unicode data files from Unicode 9.0.0
* admin/unidata/copyright.html:
* admin/unidata/BidiBrackets.txt:
* admin/unidata/UnicodeData.txt: Update from Unicode 9.0.0, just
released.